package com.chenyao.curtain.hello;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.chenyao.curtain.entities.User;

@Service
public class SendHello {

	
	@Autowired
	AmqpTemplate amqpTemplate;
	
	public void send(String message){
		amqpTemplate.convertAndSend("hello1", message);
	}
	
	public void send(User user){
		amqpTemplate.convertAndSend("hello1", user);
	}
	
	
}
